package onem.soria.utils;

import lombok.SneakyThrows;

import java.io.*;

public class FileUtil {
    @SneakyThrows
    public static int read(FileInputStream input, byte[] data) {
        return input.read(data);
    }

    @SneakyThrows
    public static long skip(FileInputStream input, long length) {
        return input.skip(length);
    }

    @SneakyThrows
    public static void write(File file, byte[] data) {
        FileOutputStream out = new FileOutputStream(file);
        out.write(data);
        out.flush();
        out.close();
    }
}
